<%@ page import="projetoclinica.Medico" %>



<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'nome', 'error')} required">
	<label for="nome">
		<g:message code="medico.nome.label" default="Nome" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="nome" required="" value="${medicoInstance?.nome}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'sexo', 'error')} required">
	<label for="sexo">
		<g:message code="medico.sexo.label" default="Sexo" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="sexo" from="${tiposEnum.Sexo?.values()}" keys="${tiposEnum.Sexo.values()*.name()}" required="" value="${medicoInstance?.sexo?.name()}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'crm', 'error')} required">
	<label for="crm">
		<g:message code="medico.crm.label" default="CRM" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="crm" required="" value="${medicoInstance?.crm}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'cpf', 'error')} required">
	<label for="cpf">
		<g:message code="medico.cpf.label" default="CPF" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="cpf" required="" value="${medicoInstance?.cpf}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'email', 'error')} ">
	<label for="email">
		<g:message code="medico.email.label" default="Email" />
		
	</label>
	<g:field type="email" name="email" value="${medicoInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'telefoneI', 'error')} ">
	<label for="telefoneI">
		<g:message code="medico.telefoneI.label" default="Telefone" />
		
	</label>
	<g:textField name="telefoneI" value="${medicoInstance?.telefoneI}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'telefoneII', 'error')} ">
	<label for="telefoneII">
		<g:message code="medico.telefoneII.label" default="Telefone Opcional" />
		
	</label>
	<g:textField name="telefoneII" value="${medicoInstance?.telefoneII}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'dataNascimento', 'error')} required">
	<label for="dataNascimento">
		<g:message code="medico.dataNascimento.label" default="Data de Nascimento" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="dataNascimento" precision="day"  value="${medicoInstance?.dataNascimento}"  />
</div>


<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'endereco.logradouro', 'error')} required">
	<label for="endereco.logradouro">
		<g:message code="medico.endereco.logradouro.label" default="Logradouro" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.logradouro" required="" value="${medicoInstance?.endereco?.logradouro}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'endereco.numero', 'error')} required">
	<label for="endereco.numero">
		<g:message code="medico.endereco.numero.label" default="Numero" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="endereco.numero" required="" value="${medicoInstance?.endereco?.numero}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'endereco.bairro', 'error')} required">
	<label for="endereco.bairro">
		<g:message code="medico.endereco.bairro.label" default="Bairro" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.bairro" required="" value="${medicoInstance?.endereco?.bairro}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'endereco.cep', 'error')} required">
	<label for="endereco.cep">
		<g:message code="medico.endereco.cep.label" default="Cep" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.cep" required="" value="${medicoInstance?.endereco?.cep}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'endereco.cidade', 'error')} required">
	<label for="endereco.cidade">
		<g:message code="medico.endereco.cidade.label" default="Cidade" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.cidade" required="" value="${medicoInstance?.endereco?.cidade}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: medicoInstance, field: 'endereco.estado', 'error')} required">
	<label for="endereco.estado">
		<g:message code="medico.endereco.estado.label" default="Estado" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="endereco.estado" from="${tiposEnum.Estado?.values()}" keys="${tiposEnum.Estado.values()*.name()}" required="" value="${medicoInstance?.endereco?.estado?.name()}"/>
</div>


